<?php
	
	namespace Aspic\Form\Element;
	use Aspic\Security\Security as S;
	
	/**
	* FileDialog form element
	*/
	class FileDialog extends AbstractInput {

		public function __construct($name, $label = '', array $options = array(), array $attributes = array()) {
			parent::__construct('file', $name, $label, null, $options);
			
			$this->valueIsRetrievable = false;
		}
		
		protected function getDefaultId() {
			return 'ftbx'.ucfirst($this->getName());
		}
		
		public function getHttpValue(array $form = null) {
			$form = static::getFormArray($form);

			// Search in $_FILES
			$value = &A\UArray::getSubArrayRefFromHtmlPath($_FILES, $this->getName(true));

			return $value;
		}
		
		public function bind(array $formData = null)  {
			return false;
		}
		
	}	
	
?>